/*
#include <math.h>
#include <algorithm>
#include <string>
#include <map>
#include <hash_map>
#include <set>
#include <vector>
#include <iostream>
#include <sstream>
using namespace std;
int mySqrt(int x) {
	if(x==1)
		return 1;
	double  precision=0.001;
	double left=0,right=x,tmp,mid=(left+right)/2;
	tmp=mid*mid;
	while(abs(tmp-x)>precision){
		if(tmp>x){
			right=mid;
		}else{
			left=mid;
		}
		mid=(left+right)/2;
		tmp=mid*mid;
	}
	return (int)mid;
}
int main(){
	cout<<mySqrt(16);
	cout<<endl;
	system("pause");
	return 0;
}
*/